#include "compte.h"
#include <iostream>


Compte::Compte()
{
}
Compte::Compte(long num,double solde)
{
	this->num=num;
	this->solde=solde;
}

long Compte::getNum()const
{
	return num;
}

void Compte::setNum(long num)
{
	this->num=num;
}

void Compte::afficher() const
{
	cout<<"numero de compte"<<num<<endl;
	cout<<"solde est"<<solde<<endl;
}

void Compte::ajouter(double sum)
{
solde+=sum;
}
bool Compte::retirer(double sum)
{
if (sum<=solde)
	{
	solde-=sum;
	return true;
	}return false;
}
 
